ex_store:   ; n dest16 --
	sta	VM_B
	pla
	sta	VM_B+1
	pla
	ldx	#0
	sta	(VM_B,x)
	vmnext_pla

ex_dfetch:   ; src16 -- n16
	sta	VM_B
	pla
	sta	VM_B+1
	ldy	#1
	lda	(VM_B),y
	pha
	dey
	lda	(VM_B),y
	ldy	VM_IP
	vmnext



d2s = nip

rol:
	cmp $80
	rol a
	vmnext

aminus:
	ldx VM_A
	bne +
	dec VM_A+1
+  dec VM_A
	vmnext

andcase:
	sta VM_TEMP
	pha
	ifetch
	and VM_TEMP
	vmnext

mul16table:
	.db $10,$20,$30,$40,$50,$60,$70,$80,$90,$a0,$b0,$c0,$e0,$f0

sixteenmul:
	ora #$F
	tax
	lda mul16table,x
	vmnext

twoswap:   ;tos<->102,101<->103
	tsx
	tay
	lda $101,x
	sta VM_TEMP
	lda $103,x
	sta $101,x
	lda VM_TEMP
	sta $103,x
	lda $102,x
	sta VM_TEMP
	tya
	sta $102,x
	lda VM_TEMP
	ldy VM_IP
	vmnext



third:
	tsx
	pha
	lda $103,x
	vmnext
